import { request } from '@/utils/request';
import type { BaseResponse } from '@/api/model/detailModel';


export function userLogin(data: Record<string, unknown>): Promise<BaseResponse> {
  return request.post<BaseResponse>({
    url: '/publicdo/login',
    data,
  });
}

export function userInfo(): Promise<BaseResponse> {
  return request.get<BaseResponse>({
    url: '/adminuser/info',
  });
}

export function userLogout(token: string): Promise<BaseResponse> {
  const data = {
    token,
  };
  return request.post<BaseResponse>({
    url: '/publicdo/logout',
    data,
  });
}
